Fixes regarding encoding and code-page handling#41
Merged
rizonesoft merged 6 commits intorizonesoft:masterfrom Aug 6, 2017
Merged
Fixes regarding encoding and code-page handling#41rizonesoft merged 6 commits intorizonesoft:masterfrom
rizonesoft merged 6 commits intorizonesoft:masterfrom
Conversation
…is will lead to problems on changing encoding)
- standard encoding is ANSI, (resp. UTF8 - if no(-1) encoding default is given in .ini-file: DefaultEncoding=n) - copy/paste non ANSI characters to ANSI encoded NP3 windo will recode them to ANSI (same as manually recode)
…nd Ctrl-X if nothing is selected (copy / cut current line)
- using Scintilla UTF8 code-page internally for most encodings,
solves some encoding/code-page problems, the behaviour slightly changes:
+ if DefaultEncoding is not set (or set to DefaultEncoding = -1),
initial encoding is set to current system's code-page, e.g. Windows-1252
Scintilla's internal UTF8 code-page is used for edit box,
that means copy/paste from clipboard may show characters which are
not valid in this char-set of the selected code-page.
Trying to save a file with this invalid UTF8 chars will result in conversion dialog:
("... encoding from ANSI to non-ANSI (and vice versa) may replace unsupported text with default characters ...")
+ if DeaultEncoding = 0 (ANSI):
a) if LoadASCIIasUTF8 = 0 (FALSE), Scintilla's internal ANSI code-page is used for edit box
that means copy/paste from clipboard may convert chars to ANSI ()
b) if LoadASCIIasUTF8 = 1 (TRUE), Scintilla's internal UTF8 code-page is used for edit box
that means the universal UTF8 encoding is used
+ if DeaultEncoding = nnn (corresponding to some ANSI code-page encoding):
same as if DefaultEncoding is set to corresponding code-page (see section "DefaultEncoding is not set")
- consistent encoding <> code-page handling (including Scintilla's code-page settings) - Scintilla issue regarding notepad2-mod issie rizonesoft#173 (see XhmikosR/notepad2-mod#193) - allow arbitrary conversion between encodings (even it it does not make sense in any case) (instead of doing silently nothing but changing encoding info on status bar)
- Settings: SciDirectWriteTech, SciFontQuality
+ values according to Scintilla documentation
+ values = -1 (or not set) - don't call SCI API anyway - should be the same as DEFAULT technology settings (values = 0)
SC_TECHNOLOGY_DEFAULT = 0, SC_TECHNOLOGY_DIRECTWRITE = 1, SC_TECHNOLOGY_DIRECTWRITERETAIN = 2, SC_TECHNOLOGY_DIRECTWRITEDC = 3
SC_EFF_QUALITY_DEFAULT = 0, SC_EFF_QUALITY_NON_ANTIALIASED = 1, SC_EFF_QUALITY_ANTIALIASED = 2, SC_EFF_QUALITY_LCD_OPTIMIZED = 3
Collaborator
Author
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.